package com.qkm.xinguan.domain.infrastructure.mapper;

import com.qkm.xinguan.domain.entity.HouseInfo;
import com.qkm.xinguan.domain.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qkm.xinguan.domain.transform.dto.HouseInfoDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 购物车表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2021-12-21 18:45:42
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {
	/**
	 * 通过用户id查询所有订购房屋消息
	 *
	 * @return List<String>
	 * @param id
	 */
	List<String> getTouristById(@Param("id") Long id);

	/**
	 * 通过 部门id列表获取部门名称列表
	 *
	 * @return List<String>
	 * @param ids
	 */
	List<HouseInfo> getHouseInfoByIds(@Param("ids") List<String> ids);

	boolean deleteByHouseId(@Param("tourist")Long tourist, @Param("house_info_id")Long houseId);

	int ifExist(@Param("id")Long id);

	boolean clearOrder(@Param("tourist")Long tourist);
}
